package com.red.star.wechat.data.mappers;

import com.red.star.wechat.data.core.base.MyMapper;
import com.red.star.wechat.data.entity.MerchantExpand;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * @author AMGuo
 * @Description
 * @date 2018/04/12 13:50
 */
public interface MerchantExpandMapper extends MyMapper<MerchantExpand> {

	@Select(value = "select * from t_merchant_expand t where t.merchant_id = #{merchantId} and " +
			"t.fans_id = #{fansId} order by t.id desc limit 1")
	MerchantExpand findByMerchantAndFans(@Param("merchantId") Integer merchantId,
	                                     @Param("fansId") Integer fansId);
}
